/**
 * 功能描述 表单
 */

define(function (require, exports, module){
	var Form = require("form");
	var store =require("store");
	var activeUser = store.get("user");
	var instance = {
		initComponent: function (params,widget){
			var form=new Form({
				parentNode:".J-form",
				show:false,
				model:{
					id:"planItem",
					defaultButton:false,
					layout : "3_1",
					items:[{
						name:"pkCIImplement",
						type:"hidden"
					},{
						name:"groupUnit",
						label:"组团单位",
						validate:["required"],
						readonly: true
					},{
						name:"destination",
						label:"目的地",
						readonly:true,
						validate:["required"]
					},{
						name:"signUpNumber",
						label:"报名人数",
						readonly:true
					},{
						name:"checkInDate",
						label:"开始日期",
						type:"date",
						mode:"YYYY.MM.DD",
						readonly:true
					},{
						name:"checkOutDate",
						label:"结束日期",
						type:"date",
						mode:"YYYY.MM.DD",
						readonly:true
					},{
						name: "checkInType",
						label: "入住类型",
						type:"select",
						options: [{
			                key: "Member",
			                value: "会员团"
			            }, {
			                key: "Alliance",
			                value: "联盟团"
			            }, {
			                key: "NonMember",
			                value: "散客"
			            }],
			            validate:["required"],
						events: {
		                    "click": function(e) {
		                    	
		                    }
		                },
					},/*{
						name:"roomType",
						label:"房型",
						readonly:true
					},{
						name:"roomPrice",
						label:"房价",
						readonly:true
					},{
						name:"checkInPrice",
						label:"入住价",
						type:"text",
						validate:["required"],
						exValidate: function(value) {
	                        var reg = /^[0-9]*[1-9][0-9]*$/;
	                        if (!reg.test(value)) {
	                        	form.setValue("checkInPrice", ""); 
	                            return "不可输入0，负数，小数，特殊字符，汉字";
	                        } else {
	                            return true;
	                        }
	                    },
					},*/{
						name:"reservePerson",
						label:"经办人",
						readonly:true
					},{
						name:"reserveDate",
						label:"预约日期",
						type:"date",
						mode:"YYYY.MM.DD",
						readonly:true
					}]
				}
			});
			widget.set("form", form);
		}
	};
	module.exports = instance;
});